package cheme.ProcessEditor;

import org.eclipse.draw2d.Layer;
import org.eclipse.draw2d.XYLayout;

public class ChemeEquationsLayer extends Layer
{
//	private Viewport viewport;
//
//	private int hBarOffset;
//
//	private int vBarOffset;
//	
//	public Viewport getViewport()
//	{
//		return viewport;
//	}
//
//	public void setViewport(Viewport viewport)
//	{
//		this.viewport = viewport;
//	}

	ChemeEquationsLayer()
	{
		super();

		setEnabled(true);
		setVisible(true);
		setLayoutManager(new XYLayout());
		
//		setViewport(viewport);
		
//		hookViewport();
	}
	
//	private void dispose()
//	{
////		unhookViewport();
//	}

//	private PropertyChangeListener horizontalChangeListener = new PropertyChangeListener()
//	{
//		public void propertyChange(PropertyChangeEvent event)
//		{
//			RangeModel model = getViewport().getHorizontalRangeModel();
//			primTranslate(-(model.getValue()), 0);
//		}
//	};
//
//	private PropertyChangeListener verticalChangeListener = new PropertyChangeListener()
//	{
//		public void propertyChange(PropertyChangeEvent event)
//		{
//			RangeModel model = getViewport().getVerticalRangeModel();
//			primTranslate(0, -(model.getValue()));
//		}
//	};

//	private void hookViewport()
//	{
//		getViewport().getHorizontalRangeModel().addPropertyChangeListener(horizontalChangeListener);
//		getViewport().getVerticalRangeModel().addPropertyChangeListener(verticalChangeListener);
//	}
//
//	private void unhookViewport()
//	{
//		getViewport().getHorizontalRangeModel().removePropertyChangeListener(horizontalChangeListener);
//		getViewport().getVerticalRangeModel().removePropertyChangeListener(verticalChangeListener);
//	}
}
